/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */
#pragma once

#include <string>
#include <Converter.h>

namespace liba {
namespace lib3d {
namespace node {

enum VAlignment { VA_TOP, VA_MIDDLE, VA_BOTTOM_BASELINE, VA_BOTTOM_BLOCK };
extern converter::EnumPair<char, VAlignment> VAlignmentNames[];

class TextData
{
public:
	enum Alignment { LEFT, CENTER, RIGHT };

	TextData();
	TextData(const TextData& rhs);
	const TextData& operator=(const TextData& rhs);

	void SetAlignment(Alignment value);
	void SetValignment(VAlignment value) { this->valignment = value; }
	void SetText(const std::wstring& value);
	void SetNormalize(bool value);
	void SetMaxWidth(int val);

	Alignment GetAlignment() const;
	VAlignment GetVAlignment() const { return valignment; }
	const std::wstring& GetText() const;
	bool GetNormalize() const;
	int GetMaxWidth() const;

private:
	Alignment alignment;
	VAlignment valignment;
	std::wstring text;
	bool normalize;
	int max_width;
};

} // namespace node
} // namespace lib3d
namespace converter{
template<>
struct ConverterTraits<char, lib3d::node::VAlignment>
:	public ConverterTraitsEnumBase<char, lib3d::node::VAlignment, lib3d::node::VAlignmentNames>
{};
} // namespace converter
} // namespace liba